package com.ocom.webapi.controller;


import com.ocom.common.constant.AccessServiceUrl;
import com.ocom.common.resp.Result;
import com.ocom.webapi.service.FileDownLoadService;
import com.ocom.webapi.vo.filedownload.GetDownLoadListVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

//@Slf4j
@RestController
@PreAuthorize("@pms.hasRole('ROLE_WEB')" )
public class FileDownLoadController {
    private final Logger log = LoggerFactory.getLogger(FileDownLoadController.class);
    @Autowired
    private FileDownLoadService fileDownLoadService;
    /**
     * 获取列表 （/getDownLoadList）
     * */
    @PostMapping(AccessServiceUrl.URL_GetDownLoadList)
    public Result GetDownLoadList(@Validated @RequestBody GetDownLoadListVo getDownLoadListVo){

        log.info("获取列表请求参数:{{}}",getDownLoadListVo);
       return fileDownLoadService.GetDownLoadList(getDownLoadListVo);
    }

}
